package top.igotcha.mapreduce.flowpartition.reducer;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
import top.igotcha.mapreduce.flowpartition.bean.FlowBean;

import java.io.IOException;

/**
 * @time 2021/1/10
 * @auth Gotcha
 * @describe
 */
public class FlowSortReducer extends Reducer<FlowBean,Text,Text, FlowBean> {
    @Override
    protected void reduce(FlowBean key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
        for (Text value : values) {
            context.write(value,key);
        }
    }
}
